1. Field of the Invention
The present invention relates to a rotary encoder and, more specifically, relates to a rotary encoder which is built-in such as in a mouse and track ball used for a personal computer, a work station and the like and detects an movement amount or an operation amount (hereinafter referred to as operation amount) in the form of a rotation amount.
2. Description of Background Art
Within the mouse, the track ball and X axis and Y axis sensing mechanisms are usually built-in. The X axis sensing mechanism includes a roller frictionally coupled to the ball and detects movement in the X axis direction and the rotation of the roller is detected by a rotation amount detector such as a rotary encoder. The Y axis sensing mechanism also detects movement in the Y axis direction using a detector based on the rotation of the roller in Y axis direction.
FIG. 3 shows a detector portion in a rotary encoder constituting a detector including an X axis or Y axis sensing mechanism.
Numeral 10 is a detector and numeral 11 is a rotary shaft of a roller which is built-in such as in a mouse and a track ball and is frictionally coupled with the ball. 12 is a disk secured to the rotary shaft 11 provided with many radially extending slits 12a and is designed to rotate in association with the rotation of the ball, the movement of which is transmitted via the rotary shaft 11.
13 is a light emission diode and irradiates light receiving elements (photo transistors) 14 and 15 disposed at the opposite side of the disk 12 via the slits 12a. The light receiving elements 14 and 15 are disposed in a single light receiving unit 7 and the positions of the respective light receiving elements 14 and 15 are set in such a manner that when the respective light receiving elements 14 and 15 receive emitted light from the light emission diode 13 via the slits 12a, the respective light receiving elements 14 and 15 generate signals whose phases deviate by about 90.degree. from each other depending on their light receiving positions.
The respective light receiving elements 14 and 15 are constituted by photo transistors, and their collector sides are connected to a power source line Vcc and their emitter sides are connected to the ground via respective variable resistors R1 and R2. Detection signals obtained from the respective light receiving elements 14 and 15 are taken out from the variable resistors R1 and R2 constituting their loads as voltage signals of A phase and B phase and are inputted respectively into comparators 16 and 17 in an encoder 18 provided as a waveform shaping circuit.
When two photo transistors are built-in in the single light receiving unit 7 as explained above, the two photo transistors receive light successively. Therefore the quantity of light irradiated onto the respective photo transistors gradually increases and reaches to maximum according to the rotation of the disk 12 and then begins to decrease. Accordingly, the photo-electrically converted signals at respective photo transistors, namely the detection voltage signals of A phase and B phase (hereinafter simply called as A phase signal and B phase signal) show voltage signals having a substantially sinusoidal waveform other than a rectangular waveform. Therefore, the respective voltage signals are subsequently inputted into the comparators 16 and 17 in the encoder 18 and waveform-shaped into two detection pulses of A phase and B phase (hereinafter simply called as A phase detection pulse and B phase detection pulse). The A phase detection pulse and the B phase detection pulse are respectively inputted into a logic circuit from the comparators 16 and 17 and are sent out to a main body such as a computer after being coded into pulse signals of X direction and Y direction or after being subjected to a conversion into predetermined pulses.
In this instance, sensitivity characteristic variation of the photo transistors caused during manufacturing thereof and light receiving characteristic variation under the assembled condition of the photo diode constituting the light emitting element and the light receiving elements raises problems. In order to absorb these characteristic variations the resistance values of the variable resistors R1 and R2 are adjusted. Instead of the provision of the variable resistors R1 and R2, such a circuit can be provided wherein a plurality of resistors are in advance disposed at the position of the variable resistors and an optimum resistor is selected among the plurality of resistors depending on the circuit condition. In this instance a resistor having the optimum resistance value is selected by cutting off the connecting wirings of other remaining resistors.
Now, the detection pulses respectively formed by waveshaping the A phase signal and B phase signal are counted at the timing of their leading edges or trailing edges and are mostly coded such as into pulse signals. In such an instance, it is preferable that these detection pulses show a phase difference of 90.degree. from each other and are pulses having a duty of 50%. However, in these types of conventional detectors for rotary encoders the amplitudes of A phase and B phase signals prior to the generation of the detection pulses vary depending on variations of the light emitting characteristic of the light emitting diode and of the sensitivity of the photo transistors caused during manufacturing thereof. As a result, the waveforms of the detection pulses after wave shaping vary and the correct phase relationship therebetween is lost. For these reasons it becomes necessary to adjust the levels of the output signals from the respective light receiving elements such as by variable resistors R1 and R2. Therefore, it was difficult to realize a rotary encoder that was free of adjustment as usually required for these types of rotary encoders.
FIG. 4 is a circuit which realizes the free of adjustment for these types of the circuits. Between the light receiving elements 14 and 15 and the comparators 16 and 17, comparators 19 and 20 which generate an average value of the output signals from the light receiving elements as a reference level are provided. At - inputs (wherein - phase input in this instance constitutes a reference input side which is also true hereinafter) of the comparators 19 and 20, integration circuits 19a and 20a, each constituted by a resistor and a capacitor and generating the average value, are respectively inserted and with these measures the pulses having a duty of about 50% are obtained. However, the required phase difference of these pulses is affected by the output signal levels of the respective light receiving elements 14 and 15 and is not maintained correctly. Further, these types of circuits require a capacitor having a comparatively large capacitance, therefore it raised problems that it is difficult to form these circuits into an IC and further the circuit size thereof increases.